package com.yiwenup.exception.failure;

import org.springframework.boot.diagnostics.AbstractFailureAnalyzer;
import org.springframework.boot.diagnostics.FailureAnalysis;

/**
 * 参数异常启动报错包装
 **/
public class IllegalInjectionFailureAnalyzer extends AbstractFailureAnalyzer<IllegalArgumentException> {
    @Override
    protected FailureAnalysis analyze(Throwable rootFailure, IllegalArgumentException cause) {
        return new FailureAnalysis(cause.getMessage(), "Please check injection param!", cause);
    }
}
